class SyncHook{
    constructor(){
        this.tap = [];
    }
    tap(name,fn){
        this.taps.push(fn);
    }
    call(...args){
        this.taps.forEach(tap=>tap(...args))
    }
}


//插件
class MyPlugin{
    apply(){
        syncHook.tap('MyPlugin',()=>{
            
        })
    }
}

let myPlugin = new MyPlugin();
